﻿<Page x:Class="SoundPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:xcdg="clr-namespace:Xceed.Wpf.DataGrid;assembly=Xceed.Wpf.DataGrid"
    xmlns:Views="clr-namespace:Xceed.Wpf.DataGrid.Views;assembly=Xceed.Wpf.DataGrid"
    Title="SoundPage">
    <Page.BindingGroup>
        <BindingGroup />
    </Page.BindingGroup>
    <DockPanel>
        <StackPanel DockPanel.Dock="Top">
            <TextBlock Text="通知サウンドを登録します。" Margin="0 0 0 10" />
        </StackPanel>

        <StackPanel DockPanel.Dock="Bottom">
            <StackPanel Orientation="Horizontal" Margin="0 5 0 0" HorizontalAlignment="Right" >
                <Button Width="100">
                    <StackPanel Orientation="Horizontal" Margin="0">
                        <Image Source="../../Images/sound-plus_small.png" Style="{StaticResource SmallIconStyle}" VerticalAlignment="Center" Margin="5 0 5 0" />
                        <Label Content="追加(_A)..." VerticalAlignment="Center" Margin="0 0 5 0" Padding="0" />
                    </StackPanel>
                </Button>

                <!--<Button Content="削除(_D)" Width="100" Margin="5 0 0 0" />-->
            </StackPanel>
        </StackPanel>


        <xcdg:DataGridControl
                    x:Name="SoundDataGrid"
                    ItemsSource="{Binding SoundOptions.SoundFiles}" 
                    AutoCreateColumns="False"
                    
                    NavigationBehavior="RowOrCell"  
                    ItemScrollingBehavior="Immediate">

            <xcdg:DataGridControl.Columns>
                <xcdg:Column FieldName="SoundId" x:Name="SoundIdColumn"
                             Title="アイコン"
                             Width="50"
                             />
                <xcdg:Column FieldName="Path" x:Name="PathColumn"
                             Title="ファイル"
                             Width="250"
                             />
                <!--<xcdg:Column FieldName="IsSelected" x:Name="IsSelectedColumn"
                             Title="削除"
                             Width="50"
                             ReadOnly="True"/>-->

            </xcdg:DataGridControl.Columns>
            <xcdg:DataGridControl.View>
                <Views:TableView UseDefaultHeadersFooters="False" IsAlternatingRowStyleEnabled="True" VerticalGridLineThickness="1" ShowRowSelectorPane="False">
                    <Views:TableView.FixedHeaders>
                        <DataTemplate>
                            <xcdg:ColumnManagerRow />
                        </DataTemplate>
                    </Views:TableView.FixedHeaders>
                </Views:TableView>
            </xcdg:DataGridControl.View>
        </xcdg:DataGridControl>

    </DockPanel>
</Page>
